package spittr.data;

import org.springframework.stereotype.Component;
import spittr.Spittle;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Component
public class JDBCSpittleRepository implements SpittleRepository {
    public List<Spittle> findSpittles(long max, int count) {
        return createSpittleList(20);
    }


    private List<Spittle> createSpittleList(int count){
        List<Spittle> list = new ArrayList<Spittle>();
        for (int i = 0; i < count; i++) {
            list.add(new Spittle("Spittle"+i,new Date()));
        }
        return list;
    }
}
